#{extends 'layout.html' /}
#{set title:messages.get('crud.show.title', 'Mi Perfil') /}

<div id="crudShow" class="${type.name}">

	<h2 id="crudShowTitle">&{'crud.show.title', 'Mi Perfil'}</h2>
	
	<div class="objectForm">
		
		#{form action:@savePerfilEA(object._key()), enctype:'multipart/form-data'}
			#{field 'object.nombre'}
				<div class="crudField crud_text">
					<label for="object_nombre">
						Nombre
					</label>
					<input id="object_nombre" class="${field.errorClass}" type="text" name="object.nombre" value="${object.nombre}" size="50" maxlength="50"/>
					#{ifError field.name}
						<span class="error">#{error 'object.nombre' /}</span>
					#{/ifError}
					<span class="crudHelp">
						Required.
					</span>
				</div>			
			#{/field}
			
			#{field 'object.direccion'}
				<div class="crudField crud_text">
					<label for="object_direccion">
						Direcci&oacute;n
					</label>
					<input id="object_direccion" class="${field.errorClass}" type="text" name="object.direccion" value="${object.direccion}" size="50" maxlength="50" />
					#{ifError field.name}
						<span class="error">#{error 'object.direccion' /}</span>
					#{/ifError}
					<span class="crudHelp">
						Required.
					</span>
				</div>			
			#{/field}
			
			#{field 'object.localidad'}
				<div class="crudField crud_text">
					<label for="object_localidad">
						Localidad
					</label>
					<input id="object_localidad" class="${field.errorClass}" type="text" name="object.localidad" value="${object.localidad}" size="50" maxlength="50" />
					#{ifError field.name}
						<span class="error">#{error 'object.localidad' /}</span>
					#{/ifError}
					<span class="crudHelp">
						Required.
					</span>
				</div>			
			#{/field}
			
			#{field 'object.provincia'}
				<div class="crudField crud_text">
					<label for="object_provincia">
						Provincia
					</label>
					<input id="object_provincia" class="${field.errorClass}" type="text" name="object.provincia" value="${object.provincia}" size="50" maxlength="50" />
					#{ifError field.name}
						<span class="error">#{error 'object.provincia' /}</span>
					#{/ifError}
					<span class="crudHelp">
						Required.
					</span>
				</div>			
			#{/field}
			
			#{field 'object.codigoPostal'}
				<div class="crudField crud_text">
					<label for="object_codigoPostal">
						C&oacute;digo Postal
					</label>
					<input id="object_codigoPostal" class="${field.errorClass}" type="text" name="object.codigoPostal" value="${object.codigoPostal}" size="50" maxlength="50" />
					#{ifError field.name}
						<span class="error">#{error 'object.codigoPostal' /}</span>
					#{/ifError}
				</div>			
			#{/field}
			
			#{field 'object.telefono'}
				<div class="crudField crud_text">
					<label for="object_telefono">
						Tel&eacute;fono
					</label>
					<input id="object_telefono" class="${field.errorClass}" type="text" name="object.telefono" value="${object.telefono}" size="50" maxlength="50" />
					#{ifError field.name}
						<span class="error">#{error 'object.telefono' /}</span>
					#{/ifError}
				</div>			
			#{/field}
			
			#{field 'object.paginaWeb'}
				<div class="crudField crud_text">
					<label for="object_paginaWeb">
						P&aacute;gina Web
					</label>
					<input id="object_paginaWeb" class="${field.errorClass}" type="text" name="object.paginaWeb" value="${object.paginaWeb}" size="50" maxlength="50" />
					#{ifError field.name}
						<span class="error">#{error 'object.paginaWeb' /}</span>
					#{/ifError}
				</div>			
			#{/field}
			
			#{field 'object.horarios'}
				<div class="crudField crud_text">
					<label for="object_horarios">
						Horarios de Atenci&oacute;n
					</label>
					<input id="object_horarios" class="${field.errorClass}" type="text" name="object.horarios" value="${object.horarios}" size="50" maxlength="50" />
					#{ifError field.name}
						<span class="error">#{error 'object.horarios' /}</span>
					#{/ifError}
				</div>			
			#{/field}
			
			#{field 'object.infoAdicional'}
				<div class="crudField crud_text">
					<label for="object_infoAdicional">
						Informaci&oacute;n Adicional
					</label>
					<textarea id="object.infoAdicional" name="object.infoAdicional" maxlength="5000" rows="10" cols="49" class="${field.errorClass}">${object.infoAdicional}</textarea>
					#{ifError field.name}
						<span class="error">#{error 'object.infoAdicional' /}</span>
					#{/ifError}
				</div>			
			#{/field}
		
			<p class="crudButtons">
				<input type="button" class="btn" name="_cancel" onClick="window.location='/resto/perfil/show'" value="Cancelar" />
				<input type="submit" class="btn" value="&{'crud.save', 'Perfil'}" />
			</p>
			<input type="hidden" name="_save" value="0"/>		
			
		#{/form}
		
	</div>
</div>
